package cn.jiahua.hospital.mapper;

import cn.jiahua.hospital.pojo.News;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


public interface NewsMapper {


    public News getNewsById(@Param(value = "newsId") Integer newsId);

    public List<News> getNewsListByMap(Map<String, Object> param);

    public Integer getNewsCountByMap(Map<String, Object> param);

    public Integer insertNews(News news);

    public Integer updateNews(News news);

    public Integer deleteNewsById(@Param(value = "newsId") Integer newsId);

    public Integer batchDeleteNews(Map<String, List<String>> params);

    //分页模糊查询
    public List<News> newsSelectPage(@Param(value = "newsTitle") String newsTitle,
                                     @Param(value = "newsAuthor") String newsAuthor,
                                     @Param(value = "pageNo") Integer pageNo,
                                     @Param(value = "pageSize") Integer pageSize);

    //查询新闻总数
    public int newsSelectCount(@Param(value = "newsTitle") String newsTitle,
                               @Param(value = "newsAuthor") String newsAuthor);

}
